package com.ruoyi.material.service.impl;

import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.utils.StringUtils;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

/**
 * @program: MMS
 * @description:
 * @author: cyw
 * @create: 2021-07-24 17:13
 **/
public class Main {
    public static void main(String[] args) {
        String localPath = "D:\\project\\java\\MMS\\a/upload/2021/07/26/05d48d9f-7dfc-4db0-ad29-08e70305763e/flag.txt";
        File file = new File(localPath);
        BufferedReader reader = null;
        StringBuffer sbf = new StringBuffer();
        try {
            reader = new BufferedReader(new FileReader(file));
            String tempStr;
            while ((tempStr = reader.readLine()) != null) {
                sbf.append(tempStr);
            }
            reader.close();
            System.out.println(sbf.toString());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
        }
        System.out.println(sbf.toString());
    }
}
